<?php
    $menu = [
        ['name' => '首页', 'url' => '/'],
        ['name' => '用户列表', 'url' => '/admin/user'],
        ['name' => '角色列表', 'url' => '/admin/role'],
    ];
?>
<div>
    <h1>这是公共的header</h1>
    <ul>
        <?php foreach ($menu as $item): ?>
            <li><a href="<?php echo $item['url']; ?>"><?php echo $item['name']; ?></a></li>
        <?php endforeach; ?>
    </ul>
</div>